﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AppFuscator
{
    public partial class ResultDisplay : UserControl
    {
        public ResultDisplay()
        {
            InitializeComponent();
        }

        public void Update(AppfuscatorResult res)
        {
            if (res == null) return;

            for (int i = lstLog.Items.Count; i < res.Log.Count; i++)
            {
                lstLog.Items.Add(res.Log[i].Text, res.Log[i].Kind.GetHashCode());
                lstLog.Columns[0].Width = -2;
            }

            lblState.Text = res.TextState;
        }

        public void Clear()
        {
            lstLog.Items.Clear();
            lblState.Text = "Running...";
        }
    }
}
